<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<jsp:include page="../fragments/header.jsp">
	<jsp:param name="title" value="Order Search" />
</jsp:include>

<p>
	Search <b>${title}</b> Purchase Orders
</p>

<form class="form-horizontal" action="${pageContext.request.contextPath}/po_search" method="POST">

	<div class="form-group">
		<label for="status-search" class="control-label"><b>Status</b></label>
		<select class="form-control" id="status-search" name="status">
			<option value="">Any</option>
			<c:forEach items="${statuses}" var="status">
				<option value="${status}">${status.friendlyName}</option>
			</c:forEach>
		</select>
	</div>

	<div class="form-group">
		<label for="creator-search" class="control-label"><b>Creator</b></label>
		<select class="form-control" id="creator-search" name="creator">
			<option value="">Any</option>
			<c:forEach items="${creators}" var="creator">
				<option value="${creator.id}">${creator.username}</option>
			</c:forEach>
		</select>
	</div>
	<button type="submit" class="btn btn-default"><b>Search</b></button>
</form>

<br />
<br />

<form action="${pageContext.request.contextPath}/po_list_back">
	<button class="btn btn-default">
		<b>Back to Orders List</b>
	</button>
</form>

<jsp:include page="../fragments/footer.jsp" />